import bsinRequest from '../utils/bsinRequest';
let workflowAdminPath = process.env.contextPath_workflowAdmin;

// 保存表单模型
export const saveFormModel = (params: object) => {
  return bsinRequest(workflowAdminPath + '/model/saveFormModel', {
    serviceName: 'BsinAdminModelService',
    methodName: 'saveFormModel',
    bizParams: {
      ...params,
    },
  });
};

// 保存表单信息
export const saveForm = (params: object) => {
  return bsinRequest(workflowAdminPath + '/model/saveForm', {
    serviceName: 'BsinAdminModelService',
    methodName: 'saveForm',
    bizParams: {
      ...params,
    },
  });
};

// 请求模板列表
export const getPageListFromModel = (params: object) => {
  return bsinRequest(workflowAdminPath + '/model/getPageListFromModel', {
    serviceName: 'BsinAdminModelService',
    methodName: 'getPageListFromModel',
    bizParams: {
      ...params,
      modelType: '2',
    },
  });
};
